package com.tourism.www.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_info")
@Schema(description = "用户表")
public class UserInfo {

    @TableId(type = IdType.AUTO, value = "id")
    @Schema(description = "唯一标识", hidden = true)
    private Long id;

    @TableField(value = "username")
    @Schema(description = "用户名")
    private String username;

    @TableField(value = "mail")
    @Schema(description = "邮箱")
    private String mail;

    @TableField(value = "password")
    @Schema(description = "密码")
    private String password;

    @TableField(value = "pictures")
    @Schema(description = "头像")
    private String pictures;

    @TableField(value = "create_time")
    @Schema(description = "创建时间", hidden = true)
    private Date createTime;

    @TableField(value = "update_time")
    @Schema(description = "更新时间", hidden = true)
    private Date updateTime;

    @TableField(value = "role")
    @Schema(description = "角色", hidden = true)
    private Integer role;

}
